<template>
  <div class="zp-p-20">
    首页
    <el-button
      v-for="item in navList"
      :key="item.path"
      @click="$routerPush(item.path)"
    >
      {{ item.title }}
    </el-button>
  </div>
</template>

<script>
import router from "@/router"
export default {
  computed:{
    navList() {
      return router.options.routes.filter(item => {
        const title = item?.meta?.title
        if (title) item.title = title
        return title
      })
    }
  },
}
</script>